home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
vol15n10.zip
/
MULTIL.ZIP
/
MLSRC.ZIP
/
MSDEV
/
PROJECTS
/
MLAUNCH
/
MLAUNCH.H
< prev
next >
Wrap
C/C++ Source or Header
|
1996-03-01
|
2KB
|
70 lines
// MultiLaunch Shell Extension
// Shell Extension class and general class factory classes
// (C)1996 Continuum Research
// Written by Dr. John F. Lam
#include <objbase.h>
#include <shlobj.h>
#include "MLPage.h"
// Various initialization GUIDS that need to be defined
// {3D61D3C2-7036-11CF-B097-0080C7440B7E}
DEFINE_GUID(CLSID_MultiLaunchPropSheet,
0x3d61d3c2, 0x7036, 0x11cf, 0xb0, 0x97, 0x0, 0x80, 0xc7, 0x44, 0xb, 0x7e);
#define STRCLSID_MultiLaunchPropSheet "{3D61D3C2-7036-11CF-B097-0080C7440B7E}"
#define STRPROGID_MultiLaunchPropSheet "MultiLaunch.1"
#define STRDESCRIPTION_MultiLaunchPropSheet "Allow multiple programs to open a file extension type."
/////////////////////////////////////////////////////////////////////////////
// Classes
class CClassFactory : public IClassFactory
{
protected:
ULONG m_cRef;
public:
CClassFactory ();
~CClassFactory ();
// IUnknown methods
STDMETHODIMP QueryInterface (REFIID, LPVOID*);
STDMETHODIMP_(ULONG) AddRef ();
STDMETHODIMP_(ULONG) Release ();
// IClassFactory methods
STDMETHODIMP CreateInstance (LPUNKNOWN, REFIID, LPVOID*);
STDMETHODIMP LockServer (BOOL);
};
class CShellExtension : public IShellPropSheetExt, IShellExtInit, IContextMenu
{
protected:
ULONG m_cRef;
char m_szFile[MAX_PATH];
CMLPage MLPage;
public:
CShellExtension ();
~CShellExtension ();
// IUnknown methods
STDMETHODIMP QueryInterface (REFIID, LPVOID*);
STDMETHODIMP_(ULONG) AddRef ();
STDMETHODIMP_(ULONG) Release ();
// IShellPropSheetExt methods
STDMETHODIMP AddPages (LPFNADDPROPSHEETPAGE, LPARAM);
STDMETHODIMP ReplacePage (UINT, LPFNADDPROPSHEETPAGE, LPARAM);
// IShellExtInit method
STDMETHODIMP Initialize (LPCITEMIDLIST, LPDATAOBJECT, HKEY);
// IContextMenu methods
STDMETHODIMP QueryContextMenu (HMENU, UINT, UINT, UINT, UINT);
STDMETHODIMP InvokeCommand (LPCMINVOKECOMMANDINFO);
STDMETHODIMP GetCommandString (UINT, UINT, UINT*, LPSTR, UINT);
};